package CSS::Builder::Selector::Universal;
use Moose;

with 'CSS::Builder::Roles::List';

# The universal selector, written "*", matches the name of any element type
# If the universal selector is not the only component of a simple selector, the "*" may be omitted. For example:

#    * *[LANG=fr] and [LANG=fr] are equivalent.
#    * *.warning and .warning are equivalent.
#    * *#myid and #myid are equivalent. 
has 'universal'    => ( isa => 'Any' , is => 'rw' , default => '*');

sub css {
      my $self = shift;
      
      my $selectors = $self->list;
      my $c = $self->docss($selectors->[0]);
      
      return $self->universal . ($c ? $c : '');
}


1;